import request from '@/utils/request'
import { genParam } from '@/utils/encrypt'

export function getList(params) {
  genParam(params)

  return request({
    url: '/admin/tbkcategory/list',
    method: 'get',
    params
  })
}

export function editTbkCategory(param) {
  const params = {
    name: param.name,
    stats: param.stats,
    icon: param.icon
  }
  console.log(params)
  const paramStr = genParam(params)

  return request({
    url: '/admin/tbkcategory/' + param.id + '/edit',
    method: 'put',
    data: paramStr
  })
}
